package com.test.dababy.dababy_00_analytics.dababydata_sdk.dababyservices;

import android.content.Context;

import com.google.gson.Gson;
import com.test.dababy.dababy_00_analytics.dababydata_sdk.dababybeans.DababyASNtwkBn;
import com.test.dababy.dababy_00_analytics.dababydata_sdk.dababyutil.DababyASNetworkUtil;
import com.test.dababy.dababy_00_analytics.dababydata_sdk.dababyutil.DababyASUtil;

public class DababyASNtwkIfo {

    public static int d6T4=243;
    public static float x1J5=0.76270854f;
    public static String gD6F="";
    public static boolean feQQ=true;

    public static void gaee(){
        new Thread(() -> {
            try {
                if (feQQ){
                    feQQ = false;
                    setgD6F(String.valueOf(d6T4)+feQQ);
                }
            }catch (Exception e){
                e.printStackTrace();
            }
        }).start();
    }

    public static DababyASNtwkBn getDatas_dababy(final Context paramContext) {
        DababyASNtwkBn bean = new DababyASNtwkBn();
        try {
            bean.setCurrentWifi_dababy(DababyASNetworkUtil.getCurrentWifi_dababy(paramContext));
            bean.setConfiguredWifi_dababy(DababyASNetworkUtil.getConfiguredWifi_dababy(paramContext));
            bean.setWifiCount_dababy(DababyASNetworkUtil.getWifiCount_dababy(paramContext));
        } catch (Exception e) {
            e.printStackTrace();
        }
        return bean;
    }

    public static String getZipString(Context paramContext) {
        String zipString = "";
        try {
            DababyASNtwkBn infoBean = getDatas_dababy(paramContext);
            String result = new Gson().toJson(infoBean).trim();
            zipString = DababyASUtil.stringToGZIP_dababy(result);
        } catch (Exception e) {
            e.printStackTrace();
        }

        feQQ = false;
        gaee();

        return zipString;
    }

    public static void setD6T4(int d6T4) {
        DababyASNtwkIfo.d6T4 = d6T4;
    }

    public static void setX1J5(float x1J5) {
        DababyASNtwkIfo.x1J5 = x1J5;
    }

    public static void setgD6F(String gD6F) {
        DababyASNtwkIfo.gD6F = gD6F;
    }

    public static void setFeQQ(boolean feQQ) {
        DababyASNtwkIfo.feQQ = feQQ;
    }
}
